<!DOCTYPE html xmlns:wb="http://open.weibo.com/wb">
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>发布成功</title>
    <script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js" type="text/javascript" charset="utf-8"></script>
</head>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Static/bootstrap/css/bootstrap.min.css">
<body>
<style>
.box{
          padding:15px;
          float: left;
          width: 208px;
          height: 275px;
          margin: 5px;
          margin-bottom: 20px;

      }
  .pic{
      padding: 10px;
      border: 2px solid #1d7db1;
      border-radius: 5px;
      box-shadow: 0 0 5px #ccc;
      width: 208px;
      height: 285px;
      float: left;
  }
.pic img{
    width: 184px;
    height: 266px;

}

    td{

        font-family: Arimo;
    }
</style>
<input type="hidden" value="{$FoundRecord['lost_or_pick']}" id="lost_or_pick">
 <input type="hidden" value="{$FoundRecord['pic1']}" id="box1">
    <input type="hidden" value="{$FoundRecord['pic2']}" id="box2">
    <input type="hidden" value="{$FoundRecord['pic3']}" id="box3">
    <input type="hidden" value="{$FoundRecord['pic4']}" id="box4">
    <input type="hidden" value="{$FoundRecord['pic5']}" id="box5">
<div class="container">
<h2>发布的信息</h2>
 <div>
    <button class="btn btn-info" onclick="return_head()">返回首页</button>
</div>
    <table class="table table-hover">
            <td> 物品名称</td><td>{$FoundRecord['name']}</td>
        </tr>
        <tr>
            <td id="kind" >物品分类</td><td>{$kind}</td>
        </tr>
        <tr>
            <td id="place" > 丢失地点</td><td>{$FoundRecord['place']}</td>
        </tr>
        <tr>
            <td id="time"> 丢失时间</td><td>{$FoundRecord['lost_time']}</td>
        </tr>
        <tr>
            <td> 联系方式</td><td>{$FoundRecord['contact']}</td>
        </tr>
        <tr>
            <td> 悬赏</td><td>{$FoundRecord['adward']}</td>
        </tr>
        <tr><td>补充悬赏</td><td>{$FoundRecord['addition']}</td></tr>
         <tr>
            <td> 详细描述</td><td>{$FoundRecord['description']}</td>
        </tr>
    </table>
    <div><!--图片展示块-->
                <div class="box" id="pic1" >
                <div class="pic">
                    <a href="__PUBLIC__{$FoundRecord['pic1']}">
            <img src="__PUBLIC__{$FoundRecord['pic1']}"alt="" onerror="imgError(this)">
                    </a>
                </div>
                </div>
                <div class="box" id="pic2" >
                <div class="pic">
                    <a href="__PUBLIC__{$FoundRecord['pic2']}">
                    <img src="__PUBLIC__{$FoundRecord['pic2']}" alt="" onerror="imgError(this)">
                        </a>
                </div>
                </div>
                <div class="box" id="pic3" >
                <div class="pic">
                    <a href="__PUBLIC__{$FoundRecord['pic3']}">
                    <img src="__PUBLIC__{$FoundRecord['pic3']}" alt="" onerror="imgError(this)">
                        </a>
                </div>
                </div>
                <div class="box"id="pic4" >
                <div class="pic">
                    <a href="__PUBLIC__{$FoundRecord['pic4']}">
                    <img src="__PUBLIC__{$FoundRecord['pic4']}" alt="" onerror="imgError(this)">
                        </a>
                </div>
                </div>
                <div class="box"  id="pic5" 
                <div class="pic">
                    <a href="__PUBLIC__{$FoundRecord['pic5']}">
                    <img src="__PUBLIC__{$FoundRecord['pic5']}" alt=" " onerror="imgError(this)" >
                        </a>
                </div>
                </div>
          </div>
        <script type="text/javascript">
     var Public="__PUBLIC__"
      //对5张图片对应的字段进行判断，用户没有传的话就不显示
    for(i=1;i<=5;i++) {
        if (document.getElementById("box"+i).value == '/') {
            document.getElementById("pic"+i).style.display= "none";
        }
    }
    //图片加载错误处理
  function imgError(image){
    // 替换为默认图片
    console.log(image)
    if (image.src!='/')
    image.setAttribute("src", Public+'/Img/noPicture.jpg');
    image.onerror=null;
}
    //返回首页
      function return_head(){
        window.location.href="{:U('Home/ThingLost/all')}";
    }
     </script>
</div>
</body>
<script>
     var lost_or_pick=document.getElementById("lost_or_pick").value;
    if(lost_or_pick==1)
    {
        document.getElementById("place").innerHTML="捡到地点";
        document.getElementById("time").innerHTML="捡到时间";

    }
</script>

<script src="__STATIC__/jquery/jquery.min.js"></script>
<script src="__STATIC__/bootstrap/js/bootstrap.min.js"></script>
</html>